﻿@using SpaceNeedle.City6473.Web.Data.Models

@{
    WebSiteContent staticContent = ViewBag.StaticContent as WebSiteContent;

    string siteTitle = staticContent.Title;
    string viewTitle = ViewBag.Title;
    string pageTitle = viewTitle + " | " + siteTitle;
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,  initial-scale=1, maximum-scale=1, user-scalable=0" />
    @*<meta name="viewport" content="target-densitydpi=device-dpi">
    <meta name="apple-mobile-web-app-capable" content="yes">*@

    <title>@pageTitle</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    <style>
        body {
            overflow: hidden;
            width: 100%;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
        }

        @@-webkit-viewport {
            width: device-width;
        }

        @@-moz-viewport {
            width: device-width;
        }

        @@-ms-viewport {
            width:auto !important;
        }

        @@-o-viewport {
            width: device-width;
        }

        @@viewport {
            width: device-width;
        }
    </style>

    <script>

    function addEvent(evnt, elem, func)
    {
        if (elem.attachEvent)
        { // IE DOM
            elem.attachEvent("on" + evnt, func);
        }
        else if (elem.addEventListener)  // W3C DOM
        {
            elem.addEventListener(evnt, func, false);
        }
        else
        { // No much to do
            elem[evnt] = func;
        }
    }

        onload = function ()
        {
            //addEvent("touchmove", document.getElementById("bdy"), function (event)
            //{
            //    event.preventDefault();
            //}, false);

            //document.getElementById("bdy").addEventListener('touchmove', function (event)
            //{
            //    event.preventDefault();
            //}, false);

            if (navigator.userAgent.match(/IEMobile\/10\.0/))
            {
                var msViewportStyle = document.createElement("style");
                msViewportStyle.appendChild(
                    document.createTextNode(
                        "@@-ms-viewport{width:auto!important}"
                    )
                );
                document.getElementsByTagName("head")[0].
                    appendChild(msViewportStyle);
            }


        };

        
    </script>
</head>
<body id="bdy" style="margin:0px; padding-top: 0px;">
    <div>
        @RenderBody()
        @*<hr />
        <footer>
            <p>&copy; @DateTime.Now.Year - Space Needle Tecnologia LTDA</p>
        </footer>*@
    </div>

   
    @RenderSection("scripts", required: false)
</body>
</html>